package com.ztgf.logistics.models.vo.deppon.api;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 添加订单
 *
 * @author mxli
 * @Date 2021-09-13 22:15:56
 */
@Data
public class DepponResultVO<T> implements Serializable {

    @ApiModelProperty(value = "物流公司ID", required = true)
    protected String logisticCompanyID = "DEPPON";
    @ApiModelProperty(value = "渠道单号")
    protected String logisticID;//失败返回订单号（对方下单的订单号）
    @ApiModelProperty(value = "请求成功标识: true or false", required = true)
    protected boolean result = false;//
    @ApiModelProperty(value = "结果代码", required = true)
    protected String resultCode;
    @ApiModelProperty(value = "错误原因")
    protected String reason;//
    @ApiModelProperty(value = "请求唯一编号")
    protected String uniquerRequestNumber;//本次请求的唯一编号，用于排查问题

    @ApiModelProperty(value = "结果返回")
    protected T responseParam = null;

    public boolean isResult(){
        if("1000".equals(resultCode)){
            return true;
        }
        return false;
    }

}